﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace det
{
    public partial class ktConnect : Form
    {
        public ktConnect()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                string chuoi_ket_noi = @"Data Source=TOMMYTEO-PC\SQLEXPRESS;Initial Catalog=DET_THUDUC;Integrated Security=True";
                SqlConnection con = new SqlConnection(chuoi_ket_noi);
                con.Open();
                MessageBox.Show("Ket noi thanh cong!");
            }
            catch
            {
                MessageBox.Show("Ket noi that bai");
            }
        }
    }
}
